FROM maven:3.8.5-openjdk-17 as maven_build
COPY . /build
WORKDIR /build
RUN mvn -am -pl user-service-core -Dmaven.test.skip=true clean package

FROM bellsoft/liberica-openjdk-alpine:17.0.6
WORKDIR /app
COPY --from=maven_build /build/user-service-core/target/user-service-core-0.0.1-SNAPSHOT.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]

